package com.xc.service;

import com.github.pagehelper.PageInfo;
import com.xc.common.ServerResponse;
import com.xc.pojo.AgentUser;
import javax.servlet.http.HttpServletRequest;

/**
 * @author mipha
 * @version 1.0
 * @date 2019/2/16 2:52 PM
 */
public interface IAgentUserService {

    AgentUser getCurrentAgent(HttpServletRequest request);

    AgentUser findByCode(String agentCode);

    ServerResponse login(String agentPhone, String agentPwd, String verifyCode,HttpServletRequest request);

    ServerResponse getAgentInfo(HttpServletRequest request);

    ServerResponse updatePwd(String oldPwd,String newPwd,HttpServletRequest request);

    ServerResponse addAgentUser(String agentName ,String agentPwd
            ,String agentRealName ,String agentPhone ,HttpServletRequest request);

    ServerResponse getSecondAgent(HttpServletRequest request);


    //  管理后台
    ServerResponse<PageInfo> listByAdmin(String realName, String phone
            ,int pageNum, int pageSize, HttpServletRequest request);
    ServerResponse add(AgentUser agentUser);
    ServerResponse update(AgentUser agentUser);

    int CountAgentNum();


}
